import { request } from "../request"
// 获取是否注册
export const login = (data) => {
  return request({
    url: '/login',
    method: 'POST',
    data
  })
}
// 判断token是否过去
// 获取是否注册
export const getInfo = (data) => {
  return request({
    url: '/login/getInfo',
    method: 'GET',
    data
  })
}

// 上传文件
export const upload = (data) => {
  return request({
    url: '/upload',
    method: 'POST',
    data,
    responseType: 'blob',
  })
}

// 下载文件
export const download = (fileId) => {
  return request({
    url: `/upload/download/${fileId}`,
    method: 'GET',
  })
}